<?php use_stylesheet('frontend/modules/comment.css') ?>
<?php use_stylesheet('frontend/modules/crud.css') ?>
<?php use_helper('Date', 'Text') ?>

<h3>Comments</h3>
<br/>
<?php foreach ($post->getComments() as $comment): ?>
  <div class="comment">
    <span class="title"><?php echo link_to_if($comment->getAuthorUrl(), $comment->getAuthorName(), $comment->getAuthorUrl(), array('popup' => true)) ?></span>
    <span class="time">said about <?php echo distance_of_time_in_words(strtotime($post->getDatetime()), strtotime($comment->getDatetime())) ?> later</span>
    <br/>
    <div class="cont">
      <?php echo simple_format_text($comment->getContent()) ?>
    </div>
  </div>
<?php endforeach ?>

<br/><br/>

<!-- 
<h3>Hey Stranger, leave a comment:</h3>

<div class="crud_edit">
  <form name="comment" action="<?php echo url_for('@post_show?slug='.$post->getSlug()) ?>" method="post">
    <table class="form">
      <?php //echo $commentForm ?>
    
      <tr>
        <td></td>
        <td><input id="form_submit" type="submit" value="Send Comment" /></td>
      </tr>
    </table>
  </form>
</div>
 -->